package actor

import "runtime/debug"

// SupervisorFunc 出错后如何处置的函数
type SupervisorFunc func(reason interface{}, ctx IContext) Directive

func defaultSupervisorFunc(reason interface{}, ctx IContext) Directive {
	// 默认actor出错后停止运转
	logger.Error("[%s] crashed, %s", ctx.Self(), reason)
	logger.Error(string(debug.Stack()))
	return StopDirective
}
